# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年03月08日
"""
from docx import Document
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT


doc = Document("test1.docx")
print(doc.paragraphs[0].text)
doc.paragraphs[0].alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
# 这里设置的是居中对齐
doc.save("对齐样式.docx")
